package com.wyz.easyexcel.controller;

import com.wyz.easyexcel.service.UploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author wyz
 * @description: 上传
 * @date 2021/12/28 14:25
 */


@RestController
public class UploadController {

    @Autowired
    private UploadService uploadService;


    @PostMapping("/upload")
    public void upload(MultipartFile file) throws IOException {
        uploadService.upload(file);
    }

    @PostMapping("/download")
    public void download() throws IOException {
        uploadService.download();
    }


}
